package cn.jxau.bean.vo;

import java.util.HashMap;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonUnwrapped;

/**
 * 统一ajax的信息返回格式，
 * @author licho
 *
 */
public class JsonResult {
    private boolean success;//这次请求是是否成功
    private String status;//请求状态,200,400,500
    private String msg;//请求消息
    private Map<String,Object> data=new HashMap<String, Object>();//存放ajax数据
 
	public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

	public Map<String, Object> getData() {
		return data;
	}

	public void setData(Map<String, Object> data) {
		this.data = data;
	}
	/**
	 * 向JsonResult中添加返回数据
	 * @param name
	 * @param data
	 */
	public void addData(String name,Object data){
		this.data.put(name, data);
	}

}
